Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TCC support #2068

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add TCC support #2068

wants to merge 2 commits into from

Conversation

swagtoy
Copy link

@swagtoy swagtoy commented Apr 25, 2023

What does this PR do?

Add's TCC support

How does this PR change Premake's behavior?

Add's TCC support

Anything else we should know?

Needs review and tests (?)

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

bumps #350

@swagtoy
Copy link
Author

swagtoy commented Apr 25, 2023

I like TCC for testing (smaller) programs due to it's incredible speed, so that is why I made this PR

FYI: This is using maintained fork of TCC

-- Returns list of C preprocessor flags for a configuration.
--

tcc.cppflags = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most stuff seems to be a copy of (old) gcc functions/tables.
if true, maybe do as clang and just do tcc.XXX = gcc.XXX
I said old as some stuff seems missing (standard "C17", openmp, ...)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed, and while I agree that basing off of GCC could work due to similarities, it would strip out a lot more so i figured it was better to maintain a separate file. Is this okay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is different, then separate fields are ok.

@@ -21,6 +21,7 @@ Remove all binaries and build scripts.
Choose a C/C++ compiler, if supported by target; one of:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if supported by target

$(action).valid_tools si checked now, So it should be added there properly.

@swagtoy
Copy link
Author

swagtoy commented Apr 26, 2023

I still need to test more options this weekend bare in mind

@nickclark2016
Copy link
Member

The issue I'd have with adding in TCC to core is that the core team doesn't use TCC thus doesn't have the expertise to maintain it (one of the issues with the D stuff right now). Is it possible to make this a plugin/external script at least initially?

@Jarod42
Copy link
Contributor

Jarod42 commented Apr 26, 2023

D module seems written in modular way though.
You might use D as model to write premake-tcc as external module.

@swagtoy
Copy link
Author

swagtoy commented Apr 26, 2023

The issue I'd have with adding in TCC to core is that the core team doesn't use TCC thus doesn't have the expertise to maintain it (one of the issues with the D stuff right now). Is it possible to make this a plugin/external script at least initially?

I'm willing to maintain it myself, I use premake for many of my projects. If I have to stand up to maintain something it shouldn't be difficult

@nickclark2016
Copy link
Member

The issue I'd have with adding in TCC to core is that the core team doesn't use TCC thus doesn't have the expertise to maintain it (one of the issues with the D stuff right now). Is it possible to make this a plugin/external script at least initially?

I'm willing to maintain it myself, I use premake for many of my projects. If I have to stand up to maintain something it shouldn't be difficult

Agreed that it shouldn't be difficult. It's why external scripts are intentionally as pain-free as possible. We've recently had a similar discussion on a PR of NVCC into the core repository. It's a hard balance to strike with adding new exporters and toolsets, as there's only half a dozen people actively working on the repo, usually no more than 1 or 2 at a time (this doesn't count those who send in the one off PRs, for which we are extremely appreciative of).

@nickclark2016
Copy link
Member

Would like to see @samsinsane and @starkos's thoughts on this as well.

@swagtoy
Copy link
Author

swagtoy commented Oct 31, 2023

Hi, regardless of conflicts I would like to bump this. Any thoughts?

@nickclark2016
Copy link
Member

I personally hold the same stance, but commentary from other maintainers would be appreciated.

@samsinsane
Copy link
Member

Sorry for not replying sooner, I somehow missed this along the way. I agree with @nickclark2016 on this, an external module is the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants